package cn.bone.ou.data.mapper;

import cn.bone.ou.data.bean.CommunityNotice;
import cn.bone.ou.data.dto.NoticeDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommunityNoticeMapper extends BaseMapper<CommunityNotice> {

    /**获取列表*/
    List<NoticeDto.ListDto> list(@Param("communityId")Integer communityId,
                                 @Param("start")Integer start,
                                 @Param("num")Integer num,
                                 @Param("title")String title,
                                 @Param("state")Integer state);

    /**获取列表总数*/
    int countList(@Param("communityId")Integer communityId,
                  @Param("title")String title,
                  @Param("state")Integer state);

    /**获取公告总数*/
    int countAll(@Param("communityId")Integer communityId);
}
